﻿using System;
using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Records;


namespace Hazza.DigitalStore.Models
{
    public class DigitalContentPart : ContentPart
    {
        [Required]
        public double Price
        {
            get { return this.Retrieve(r => r.Price); }
            set { this.Store(r => r.Price, value); }
        }

        public bool HasExpirationDate {
            get { return this.Retrieve(r => r.HasExpirationDate); }
            set { this.Store(r => r.HasExpirationDate, value); }
        }

        public DateTime? ExpirationDate
        {
            get { return this.Retrieve(r => r.ExpirationDate); }
            set { this.Store(r => r.ExpirationDate, value); }
        }
    }
}